package com.settlement.system.service;

import com.settlement.system.handler.disruptor.MessageVo;
import com.settlement.system.model.entity.OmsOrderLink;
import com.settlement.system.model.entity.SysPlatformIdLink;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 平台原始单据保存服务
 */
public interface PlatformSourceDataService {

    Map<String, Object> getDataByTableNameAndId(String tablePrefix, String dataId);

    boolean existDataByTableNameAndId(String tablePrefix, String dataId);

    List<Map<String, Object>> getDataBySql(String sql, String tableName);

    List<SysPlatformIdLink> getSubNoListByMainNo(String sourcePreformMainNo);

    void saveOmsLink(String linkNo, String mainNo, String subNo, String tableId);

    List<String> getLinkList(String linkNo, String mainNo, String subNo);

    Map<String, String> checkImportFileTitle(Set<String> importFileTitleList, Map<String, String> keyMap);

    void sendMessage(String platform, String storeName, String orderType, String message);
    void sendMessage(String platform, String storeName, String orderType, String message, MultipartFile file);

    OmsOrderLink getOmsLinkRecordByOrderNo(String returnNo);

    void addNoMatchRecord(MessageVo messageVo, String billType, String remark);

    void deleteNoMatchRecord(Long dataId);

    void updateSourceStatus(String tableNamePrefix, String billMonth, String dataId);
}
